<?php
class Core_Model_Class
	extends Core_Model_Abstract
{
	protected $name;
	
	protected $id;
	
	protected $descp;
	
	protected $hitDie;
	
	protected $skillMod;
	
	protected $levelSet;
	
	public function addLevelSet(array $level)
	{
		$this->levelSet[$level['level']]	= $level;
	}
	
	public function addAllLevelsSets(array $levels)
	{
		foreach ($levels as $level)
		{
			$this->addLevel($level);
		}
	}

	public function getLevelSet($level)
	{
		if (!array_key_exists($level, $this->levels))
		{
			throw new Core_Model_Class_Exception('Invalid Level: ['. $level . '] Not allowed');
		}
		
		return $this->levelSet[$level];
	}
	
	public function getAllLevelSets()
	{
		return $this->levelSet;
	}
}